package com.hundredapp.oa.web.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import com.hundredapp.oa.dao.SelectType;
import com.hundredapp.oa.domain.OaSubject;
import com.hundredapp.oa.repository.SubjectManager;
import com.opensymphony.xwork2.ActionSupport;

@Repository
@Scope("prototype")
public class SignupAction extends ActionSupport {
	@Autowired
	private SubjectManager subjectManager;
	private List<OaSubject> subjects;
	
	public String execForm() {

		return SUCCESS;
	}

	public String execList() {

		return SUCCESS;
	}

	public String execPayment() {

		return SUCCESS;
	}

	public String execContract() {
		subjects = subjectManager.findAll(SelectType.SELECT_ALL);
		return SUCCESS;
	}
	
	public void setSubjectManager(SubjectManager subjectManager) {
		this.subjectManager = subjectManager;
	}

	public List<OaSubject> getSubjects() {
		return subjects;
	}
}
